﻿namespace Red.Core
{
    /// <summary>
    /// Special command for interop functors
    /// </summary>
    public class RedInteropCommand : RedCommand
    {
        #region Properties

        /// <summary>
        /// Interop context, parent interop object for functor
        /// </summary>
        public object InteropContext { get; set; }

        /// <summary>
        /// Contains interop functor name which should call by this command
        /// </summary>
        public string InteropFunctorName { get; private set; }

        /// <summary>
        /// Optional names for functor parameters - to display for user in interface
        /// </summary>
        public string[] InteropFunctorParamNames { get; private set; }

        #endregion

        #region Constructor

        public RedInteropCommand( string text, string iconName, string interopPath, string[] paramNames = null, bool isPrimary = false )
            : base( text, iconName, isPrimary )
        {
            InteropContext = null;
            InteropFunctorName = interopPath;
            InteropFunctorParamNames = paramNames;
        }

        #endregion
    }
}
